<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
		<script src="index.js?a=1"></script>
</head>
<body>

</body>
<script>
	// 返回的永远都是失败的Promise,接收的参数即是失败值。
	const p1 = Promise.reject(1);
	// const p1 = Promise.reject(new Promise(resolve=>resolve(1)));
	// const p1 = Promise.reject(new Promise((resolve,reject)=>reject(1)));
	
	p1.catch(value=>{
		console.log(value);
	})
</script>
</html>